<template>
	<view class="content">
		<view class="pageContent">
			<u-parse :content="content" :tagStyle="style"></u-parse>
		</view>
		<view class="button">
			<view class="btn" @click="handleToBuy">
				立即购买
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				id:'',
				content:'', 
				title:'',
				style: { 
					p: 'color: #545454;font-size:32rpx;line-height:44rpx;margin-bottom:20rpx',
					span: 'font-size: 30rpx',
					img:'width:100% !important;height:auto !important;'
				},
			}
		},
		onLoad(option) { 
			this.getDetail()
		},
		// 分享给个人
		onShareAppMessage() { 
			return {
				// title: uni.getStorageSync("common_info").shareText,
				// imageUrl: uni.getStorageSync("common_info").sharesImage,
				title:'',
				imageUrl:''
			}
		},
		//分享朋友圈
		onShareTimeline() { 
			return {
				// title: uni.getStorageSync("common_info").shareText,
				// imageUrl: uni.getStorageSync("common_info").sharesImage,
				title:'',
				imageUrl:''
			}
		},
		methods:{
			handleToBuy(){
				uni.navigateTo({
					url:"./buy"
				})
			},
			getDetail(){
				this.$http({
					url:"/umsContent/queryById",
					method:"get",
					data:{
						id:11
					}
				}).then(data=>{
					this.content = data.content
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pageContent{
		padding: 30rpx;
		padding-bottom: 160rpx;
	}
	.button{
		background: #fff;
		position: fixed;
		width: 100%;
		bottom: 0;
		left: 0;
		padding: 30rpx;
		box-sizing: border-box;
		padding-bottom: 60rpx;
		.btn{
			width: 300rpx;
			height: 80rpx;
			background: #FFEACF;
			border-radius: 50rpx;
			border: 2rpx solid #FFBF71;
			text-align: center;
			line-height: 80rpx;
			margin: 0 auto;
			color: #A60001;
			font-size: 32rpx;
		}
	}
</style>